<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" >

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

	<appender name="console" class="org.apache.log4j.ConsoleAppender">
		<param name="Target" value="System.out" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{dd-MM-yyyy HH:mm:ss,SSS}; [%t]; %-5p; %c; %x - %m%n" />
		</layout>
	</appender>
	
	<appender name="file" class="org.apache.log4j.DailyRollingFileAppender">
		<param name="File" value="./target/news-logger.log" />
		<param name="Append" value="true" />
		<param name="DatePattern" value=".yyyy-MM-dd" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{dd-MM-yyyy HH:mm:ss,SSS}; [%t]; %-5p; %c; %x - %m%n" />
		</layout>
	</appender>
	
	<logger name="br.com.news">
		<level value="debug"/>
	</logger>

	<logger name="org.springframework">
		<level value="info"/>
	</logger>

	<logger name="org.hibernate">
		<level value="warn" />
	</logger>

	<root>
		<priority value="error" />
		<appender-ref ref="console" />
		<appender-ref ref="file" />
	</root>

</log4j:configuration>
